
<h2>You are about to pay for a Claimed Kurancy with token: ${kurancyCreated.kurancyToken}</h2>

<table>
	<tr>
		<td>Amount</td>
		<td>${kurancyCreated.amount}</td>
	</tr>
	<tr>
		<td>Claimed By</td>
		<td>${kurancyCreated.claimedBy}</td>
	</tr>
</table>

<form action="https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay" target="PPDGFrame"> 
	<input id="type" type="hidden" name="expType" value="light"> 
	<input id="paykey" type="hidden" name="paykey" value="${kurancyCreated.paypalPayKey}">
	<!-- <input id="preapprovalkey" type="hidden" name="preapprovalkey" value="PA-..."> -->
	<input type="submit" id="submitBtn" value="Pay with PayPal">
</form>

<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="https://www.paypalobjects.com/js/external/dg.js"></script>
<script> 
	var dgFlow = new PAYPAL.apps.DGFlow({ trigger: 'submitBtn' });
	$(document).ready(function() {
		  $('#submitBtn').click(function() {
			 //document.location.href='/myKurancy'; 
		  });
	});
</script>